using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class BilInPlanBillDetail : BusinessBase<string>
    {
        #region Declarations

        private string _iBPlanCode = String.Empty;
        private string _goodsCode = String.Empty;
        private string _goodsBarCode = String.Empty;
        private string _goodsName = String.Empty;
        private string _goodsBatch = String.Empty;
        private string _singleGoodsCode = String.Empty;
        private string _sendDate = String.Empty;
        private string _sendBillCode = String.Empty;
        private string _pOCode = String.Empty;
        private string _productionDate = String.Empty;
        private int _goodsSpec = default(Int32);
        private decimal _piecePrice = default(Decimal);
        private int _goodsPackageQty = default(Int32);
        private int _goodsPieceQty = default(Int32);
        private int _goodsQty = default(Int32);
        private int _receiveGoodsPackageQty = default(Int32);
        private int _receiveGoodsPieceQty = default(Int32);
        private int _receiveGoodsQty = default(Int32);
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public BilInPlanBillDetail() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_iBPlanCode);
            sb.Append(_goodsCode);
            sb.Append(_goodsBarCode);
            sb.Append(_goodsName);
            sb.Append(_goodsBatch);
            sb.Append(_singleGoodsCode);
            sb.Append(_sendDate);
            sb.Append(_sendBillCode);
            sb.Append(_pOCode);
            sb.Append(_productionDate);
            sb.Append(_goodsSpec);
            sb.Append(_piecePrice);
            sb.Append(_goodsPackageQty);
            sb.Append(_goodsPieceQty);
            sb.Append(_goodsQty);
            sb.Append(_receiveGoodsPackageQty);
            sb.Append(_receiveGoodsPieceQty);
            sb.Append(_receiveGoodsQty);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        //[DataMember]
        //public override string Id
        //{
        //    get
        //    {
        //        System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
        //        uniqueId.Append(_iBPlanCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_goodsCode.ToString());
        //        return uniqueId.ToString();
        //    }
        //}

        [DataMember]
        public virtual string IBPlanCode
        {
            get { return _iBPlanCode.TrimEnd(); }
            set
            {
                OnIBPlanCodeChanging();
                _iBPlanCode = value;
                OnIBPlanCodeChanged();
            }
        }
        partial void OnIBPlanCodeChanging();
        partial void OnIBPlanCodeChanged();

        [DataMember]
        public virtual string GoodsCode
        {
            get { return _goodsCode.TrimEnd(); }
            set
            {
                OnGoodsCodeChanging();
                _goodsCode = value;
                OnGoodsCodeChanged();
            }
        }
        partial void OnGoodsCodeChanging();
        partial void OnGoodsCodeChanged();

          [DataMember]
        public virtual string GoodsBarCode
        {
            get { return _goodsBarCode.TrimEnd(); }
            set
            {
                _goodsBarCode = value;
            }
        }

        
        [DataMember]
        public virtual string GoodsName
        {
            get { return _goodsName.TrimEnd(); }
            set
            {
                OnGoodsNameChanging();
                _goodsName = value;
                OnGoodsNameChanged();
            }
        }
        partial void OnGoodsNameChanging();
        partial void OnGoodsNameChanged();

        [DataMember]
        public virtual string GoodsBatch
        {
            get { return _goodsBatch.TrimEnd(); }
            set
            {
                OnGoodsBatchChanging();
                _goodsBatch = value;
                OnGoodsBatchChanged();
            }
        }
        partial void OnGoodsBatchChanging();
        partial void OnGoodsBatchChanged();

        [DataMember]
        public virtual string SingleGoodsCode
        {
            get { return _singleGoodsCode.TrimEnd(); }
            set
            {
                _singleGoodsCode = value;
            }
        }

        [DataMember]
        public virtual string SendDate
        {
            get { return _sendDate.TrimEnd(); }
            set
            {
                _sendDate = value;
            }
        }

        [DataMember]
        public virtual string SendBillCode
        {
            get { return _sendBillCode.TrimEnd(); }
            set
            {
                _sendBillCode = value;
            }
        }

        [DataMember]
        public virtual string POCode
        {
            get { return _pOCode.TrimEnd(); }
            set
            {
                _pOCode = value;
            }
        }

        [DataMember]
        public virtual string ProductionDate
        {
            get { return _productionDate.TrimEnd(); }
            set
            {
                OnProductionDateChanging();
                _productionDate = value;
                OnProductionDateChanged();
            }
        }
        partial void OnProductionDateChanging();
        partial void OnProductionDateChanged();

        [DataMember]
        public virtual int GoodsSpec
        {
            get { return _goodsSpec; }
            set
            {
                _goodsSpec = value;
            }
        }

        [DataMember]
        public virtual decimal PiecePrice
        {
            get { return _piecePrice; }
            set
            {
                _piecePrice = value;
            }
        }

        [DataMember]
        public virtual int GoodsPackageQty
        {
            get { return _goodsPackageQty; }
            set
            {
                _goodsPackageQty = value;
            }
        }

        [DataMember]
        public virtual int GoodsPieceQty
        {
            get { return _goodsPieceQty; }
            set
            {
                _goodsPieceQty = value;
            }
        }

        [DataMember]
        public virtual int GoodsQty
        {
            get { return _goodsQty; }
            set
            {
                _goodsQty = value;
            }
        }

        [DataMember]
        public virtual int ReceiveGoodsPackageQty
        {
            get { return _receiveGoodsPackageQty; }
            set
            {
                _receiveGoodsPackageQty = value;
            }
        }


        [DataMember]
        public virtual int ReceiveGoodsPieceQty
        {
            get { return _receiveGoodsPieceQty; }
            set
            {
                _receiveGoodsPieceQty = value;
            }
        }

        [DataMember]
        public virtual int ReceiveGoodsQty
        {
            get { return _receiveGoodsQty; }
            set
            {
                _receiveGoodsQty = value;
            }
        }


        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        #endregion
    }
}